/*package com.cloud.base.consumer;

import cn.hutool.json.JSONConverter;
import cn.hutool.json.JSONObject;

import cn.hutool.json.JSONUtil;
import com.cloud.api.mq.CglxMsg;
import com.cloud.base.service.ISmsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

import jakarta.annotation.Resource;
import java.util.function.Consumer;

@Slf4j
@Component
public class PayConsumer {
    @Resource
    private ISmsService mySmsService;

     @Bean
    Consumer<CglxMsg> cglxapppay() {
        log.info("订阅成功");
        return msg -> {
            log.info("通过stream消费到消息 => {}", msg.getOrderno());

            JSONObject json =  JSONUtil.parseObj(msg);
            mySmsService.sendSms(msg.getMobile(),msg.getTemplate(), json);
        };
    }



}*/
